using System.Collections.Generic;
using System.Linq;

namespace Naptime.Extensions
{
	public static class DictionaryExtension
	{
		public static bool IsTheSameAs<T, TB>(this Dictionary<T, TB> dict1, Dictionary<T, TB> dict2)
		{
			return dict1.OrderBy((KeyValuePair<T, TB> kv) => kv.Key).SequenceEqual(dict2.OrderBy((KeyValuePair<T, TB> kv) => kv.Key));
		}
	}
}
